<include file="nav:headr"/>
<script src="__upFile__/jquery.uploadify.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="__upFile__/uploadify.css"/>
<div class="container">
    <div class="row">
        <div style="height: 30px"></div>
        <div class="col-md-2">
            <include file="tools:tools_sider"/>
        </div>
        <div class="col-md-10">
            <div class="page-header">
                <h4>{$page_title}</h4>
            </div>
            <div class="btn-group" role="group" aria-label="...">
                <a  href="{:U('Sliders/index')}" type="button" class="btn btn-default">بارلىق ئېلان</a>
            </div>
            <br><br>
            <form action="{:U('Sliders/addhend')}" method="post">
                <div class="row">
                    <div class="col-md-12">
                        <div class="panel panel-default">
                            <div class="panel-heading"> ئايلانما ئېلان رەسىمى</div>
                            <div class="panel-body">
                                <input id="adthumb1" name="adthumb" class="form-control "/>
                                <br>
                                <input type="file" name="upload"  id="ad"  />
                                <img src="" id="thumbimg1" />
                            </div>
                        </div>
                        <script type="text/javascript">
                            $(function() {
                                $('#ad').uploadify({
                                    'swf'      : '__upFile__/uploadify.swf',
                                    'uploader' : "{:U('Sliders/uploadAd')}",  //传给controller
                                    'buttonText':'ئېلان رەسىمى تاللاڭ',
                                    'onUploadSuccess':function (file,data) {
                                        data=$.parseJSON(data);
                                        $('#adthumb1').val(data);
                                        $('#thumbimg1').css({
                                            'height':'150px',
                                            'width':'250px'
                                        });
                                        $('#thumbimg1').attr('src','../../../'+data);
                                    }
                                });
                            });
                        </script>
                        <div class="form-group">
                            <input name="name" type="text" class="form-control" placeholder="تىزىملىك نامى">
                        </div>
                        <div class="form-group">
                            <input name="url" type="text" class="form-control" placeholder="تىزىملىك ئادرىسى">
                        </div>
                        <div class="form-group">
                            <input name="sort" type="number" class="form-control" placeholder="تەرتىپ">
                        </div>
                        <div class="form-group">
                            <label class="radio-inline">
                                <input type="radio" name="status"  value="1" checked> ئوچۇق
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="status"  value="0"> تاقاق
                            </label>
                        </div>
                        <button type="submit" class="btn btn-primary">قوشۇش</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<div style="height: 400px"></div>

<include file="nav:footer" />